
#import "BaseTextField.h"

@implementation BaseTextField
- (CGRect)textRectForBounds:(CGRect)bounds{
    return CGRectMake(self.leftView.bounds.size.width + 20, 0, bounds.size.width, bounds.size.height);
}
- (CGRect)editingRectForBounds:(CGRect)bounds{
    return CGRectMake(self.leftView.bounds.size.width + 20, 0, bounds.size.width, bounds.size.height);
}
- (CGRect)rightViewRectForBounds:(CGRect)bounds{
    return CGRectMake(bounds.size.width - 50, (bounds.size.height - 30) / 2, 30, 30);
}
- (CGRect)leftViewRectForBounds:(CGRect)bounds{
    return CGRectMake(self.leftView.frame.origin.x, (bounds.size.height - self.leftView.bounds.size.height) / 2, self.leftView.bounds.size.width, self.leftView.bounds.size.height);
}
@end
